:root {
  --menu-background: var(--theme-primary-010);
  --menu-text: var(--theme-primary-text-010);
  --menu-edge-opacity: 20;
}

.menu {
  padding: 1em;
  position: fixed;
  top: 0;
  right: 0;
  width: 100vw;
  height: 90vh;
  opacity: 0;
  z-index: var(--z-index-menu);
  pointer-events: none;
  transition: opacity var(--layout-transition-extra-fast);
}

@media (min-width: 550px) {
  .menu {
    width: 90vw;
  }
}

@media (min-width: 700px) {
  .menu {
    width: 100%;
    height: 100%;
    max-height: initial;
  }
}

@media (min-width: 900px) {
  .menu {
    width: 90vw;
  }
}

@media (min-width: 1100px) {
  .menu {
    width: 80vw;
    max-width: 60em;
  }
}

.menu-area {
  background-color: hsl(var(--menu-background));
  border-radius: calc(var(--theme-radius) * 0.01em);
  width: 100%;
  max-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: 1fr auto;
  justify-items: stretch;
  align-items: stretch;
  overflow-y: auto;
  pointer-events: all;
  box-shadow: var(--theme-shadow-bottom-large);
  transition: background-color var(--layout-transition-extra-fast), box-shadow var(--layout-transition-extra-fast);
}

.is-edge .menu-area {
  background-color: hsla(var(--menu-background), calc(var(--menu-edge-opacity) / 100));
  /* backdrop-filter: blur(0.5em); */
}

@media (min-width: 700px) {
  .menu-area {
    max-height: 100%;
    grid-template-rows: 1fr;
    grid-template-columns: 4fr 10fr auto;
    overflow: hidden;
    position: relative;
  }
}

.menu.is-transparent .menu-area {
  pointer-events: none;
}

.menu-list {
  display: none;
}
